package com.umpay;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

/**
 * 服务启动类
 * 
 * @ClassName WebApplication
 * @Description TODO
 * @author FENG JUN LIU
 * @Date 2018年1月6日
 * @version 1.0.0
 */
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@EnableCaching
public class WebApplication extends SpringBootServletInitializer {
    private static final Logger log = LogManager.getLogger(WebApplication.class);

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(WebApplication.class);
       
    }

    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class, args);
        log.info("**********************服务启动成功**********************");

    }

}
